package com.ruoyi.manage.article.service.impl;



import com.ruoyi.manage.article.domain.Contact;
import com.ruoyi.manage.article.mapper.ContactMapper;
import com.ruoyi.manage.article.service.IContactService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;



import java.util.List;

/**
 * contactService业务层处理
 * 
 * @author cc
 * @date 2024-11-21
 */
@Service
public class ContactServiceImpl implements IContactService
{
    @Autowired
    private ContactMapper contactMapper;

    /**
     * 查询contact
     * 
     * @param id contact主键
     * @return contact
     */
    @Override
    public Contact selectContactById(Integer id)
    {
        return contactMapper.selectContactById(id);
    }

    /**
     * 查询contact列表
     * 
     * @param contact contact
     * @return contact
     */
    @Override
    public List<Contact> selectContactList(Contact contact)
    {
        return contactMapper.selectContactList(contact);
    }

    /**
     * 新增contact
     * 
     * @param contact contact
     * @return 结果
     */
    @Override
    public int insertContact(Contact contact)
    {
        return contactMapper.insertContact(contact);
    }

    /**
     * 修改contact
     * 
     * @param contact contact
     * @return 结果
     */
    @Override
    public int updateContact(Contact contact)
    {
        return contactMapper.updateContact(contact);
    }

    /**
     * 批量删除contact
     * 
     * @param ids 需要删除的contact主键
     * @return 结果
     */
    @Override
    public int deleteContactByIds(Integer[] ids)
    {
        return contactMapper.deleteContactByIds(ids);
    }

    /**
     * 删除contact信息
     * 
     * @param id contact主键
     * @return 结果
     */
    @Override
    public int deleteContactById(Integer id)
    {
        return contactMapper.deleteContactById(id);
    }
}
